<?php
$instance = new class {
public function test(){ }
};
